export const apps = [];
import {
    NOT_LOADED,
} from './app.helpers.js';
import { reroute } from '../navigation/reroute.js';
export function registerApplication(appName, loadApp, activeWhen, customProps) {

    const registerApplication = {
        name: appName,
        loadApp: loadApp,
        activeWhen: activeWhen,
        customProps: customProps,
        status: NOT_LOADED // 应用的初始状态为 NOT_LOADED
    }
    // 将应用注册到 apps 数组中
    apps.push(registerApplication);

    // 检查 应用是否需要激活  挂载 卸载

    reroute(); // 重新路由，检查应用是否需要激活或卸载
}